package com.fcscs.cservice.service;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.fcscs.cservice.domain.ActivityLogs;
import com.fcscs.cservice.domain.PropertyConfigRestaurant;
import com.fcscs.cservice.domain.Restaurant;
import com.fcscs.cservice.domain.RestaurantConfig;
import com.fcscs.cservice.domain.model.RestaurantConfigModel;
import com.fcscs.cservice.domain.model.RestaurantConfiguration;
import com.fcscs.cservice.domain.model.RestaurantView;

@Service
public interface RestaurantManager {

	/**
	 * @param <E>
	 * @param cls
	 * @param id
	 * @return
	 */
	<E extends Restaurant> E get(Class<E> cls, long id);

	/**
	 * @param id
	 * @return
	 */
	Restaurant get(long id);

	/**
	 * @param loc
	 * @return
	 */
	Boolean delete(Restaurant loc);

	/**
	 * @param loc
	 */
	void permDelete(Restaurant loc);

	/**
	 * @param <E>
	 * @param loc
	 * @return
	 */
	<E extends Restaurant> E save(E loc);

	/**
	 * getRestaurants
	 * @param orgId organization id
	 * @param propId property id
	 * @return list list<Restaurant>
	 */
	List<Restaurant> getRestaurants(long orgId, Long propId);
	
	/**
	 * @param orgId
	 * @param propId
	 * @return List List<RestaurantView>
	 */
	List<RestaurantView> getRestaurantViews(long orgId,Long propId);

	/**
	 * @param model restaurantConfig model
	 * @return
	 */
	RestaurantConfigModel saveRestaurantConfigModel(RestaurantConfigModel model);
	
	
	/**
	 * @param orgId
	 * @param propId
	 * @return
	 */
	RestaurantConfigModel getRestaurantConfigModel(long orgId,Long propId);
	
	/**
	 * @param resc
	 * @return
	 */
	RestaurantConfiguration saveRestaurantConfig(RestaurantConfiguration  resc);
	
	/**
	 * @param restConfig
	 * @return
	 */
	RestaurantConfig saveRestaurantConfig(RestaurantConfig restConfig);
	
	/**
	 * @param restConfigId
	 * @return
	 */
	RestaurantConfig getRestaurantConfig(long restConfigId);
	
	
	/**
	 * @param orgId
	 * @param propId
	 * @param restaId
	 * @return
	 */
	List<RestaurantConfig> getRestaurantConfig(long orgId,Long propId,long restaId);
	
	/**
	 * @param propConfigRest
	 * @return
	 */
	PropertyConfigRestaurant savePropertyConfigRestaurant(PropertyConfigRestaurant propConfigRest);
	
	/**
	 * @param propConfigRestId
	 * @return
	 */
	PropertyConfigRestaurant getPropertyConfigRestaurant(long propConfigRestId);
	

	/**
	 * @param orgId
	 * @param propetyId
	 * @return
	 */
	PropertyConfigRestaurant getPropertyConfigRestaurant(long orgId,Long propetyId);
	
	/**
	 * @param propId: property id
	 * @param userId: create by
	 * @param startDate: start date
	 * @param endDate: end date
	 * @param start 
	 * @param resultCnt
	 * @return
	 */
	List<ActivityLogs> simpFindActivityLogs(long orgId,Long propId,Long userId,Date startDate,
			Date endDate,int start,int resultCnt); 
	
	
	/**
	 * @param orgId
	 * @param propId
	 * @param userId
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	int simpFindActivityLogsCnt(long orgId,Long propId,Long userId,Date startDate,Date endDate);
	
	
	/**
	 * @param propId
	 * @param actionName
	 * @param entityName
	 * @param userId
	 * @param detail
	 * @param startDate
	 * @param endDate
	 * @param start
	 * @param resultCnt
	 * @return
	 */
	List<ActivityLogs> advaFindActivityLogs(long orgId,Long propId,String actionName,String entityName,
			Long userId,String detail,Date startDate,Date endDate,int start,int resultCnt); 
	
	
	/**
	 * @param orgId
	 * @param propId
	 * @param actionName
	 * @param entityName
	 * @param userId
	 * @param detail
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	int advaFindActivityLogsCnt(long orgId,Long propId,String actionName,String entityName,
			Long userId,String detail,Date startDate,Date endDate);
}
